Skip to content

fix: résoudre l'écran gris au lancement#5

Merged
TheZupZup merged 3 commits intomainfrom
claude/fix-gray-screen-I13Ww
Apr 11, 2026
Merged

fix: résoudre l'écran gris au lancement#5
TheZupZup merged 3 commits intomainfrom
claude/fix-gray-screen-I13Ww

Conversation

@TheZupZup
Copy link
Copy Markdown
Owner

Problème

L'app affichait un écran gris au lancement après le commit WIP.

Causes identifiées et corrections

1. my_application.cc — cause principale de l'écran gris

gtk_widget_show(window) était appelé avant que la vue Flutter soit ajoutée à la fenêtre. En GTK3, un widget ajouté après que son parent est visible doit être explicitement affiché. Résultat : fenêtre grise vide.

Fix : Remplacer par gtk_widget_show_all(window) appelé après l'ajout de la vue Flutter. Ajout de hexpand/vexpand pour que la vue remplisse bien la fenêtre.

2. app/.flutter-plugins — chemins machine-spécifiques

Le fichier avait été commité avec des chemins codés en dur vers /home/thezupzup/.pub-cache/ qui n'existent pas sur d'autres machines. Flutter ne pouvait pas charger shared_preferences / path_provider.

Fix : Suppression du fichier + ajout au .gitignore.

3. nexanote.sh — régénération automatique des plugins

Ajout de flutter pub get avant flutter run pour régénérer .flutter-plugins avec les bons chemins locaux.

4. connect_screen.dart — overflow layout

Remplacement du Padding par SingleChildScrollView pour éviter les débordements verticaux sur petits écrans.

5. app_state.dart — bug interpolation

\$e$e dans le message d'erreur de sync.

claude and others added 3 commits April 11, 2026 21:32
- Wrap Column in SingleChildScrollView to handle vertical overflow
  on small screens
- Shorten code help text to prevent horizontal overflow
- Add TextOverflow.ellipsis on code text as safety net

https://claude.ai/code/session_01DrMeeXsyuHucgvtcwtJoLN
The WIP commit gutted my_application.cc and removed the critical
gtk_widget_show() call on the FlView. In GTK3, widgets added after
the parent is shown must be explicitly shown. Without this call,
the GTK window opens but Flutter renders nothing (gray screen).

Fixes:
- Replace gtk_widget_show(window) before FlView exists with
  gtk_widget_show_all(window) after FlView is added
- Add gtk_widget_set_hexpand/vexpand so FlView fills the window
- Set window title to "NexaNote"

https://claude.ai/code/session_01DrMeeXsyuHucgvtcwtJoLN
- my_application.cc: replace gtk_widget_show(window) called before
  FlView exists with gtk_widget_show_all(window) after FlView is added.
  GTK3 requires explicit show on children added after parent is visible.
  Add hexpand/vexpand so FlView fills the window. Set title to NexaNote.
- nexanote.sh: run flutter pub get before flutter run so .flutter-plugins
  is regenerated with correct local paths
- app/.gitignore: add .flutter-plugins to ignored files
- connect_screen.dart: wrap Column in SingleChildScrollView to fix
  vertical overflow; shorten code help text; add TextOverflow.ellipsis
- app_state.dart: fix string interpolation bug (\$e -> $e)

https://claude.ai/code/session_01DrMeeXsyuHucgvtcwtJoLN
@TheZupZup TheZupZup merged commit 49f9966 into main Apr 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants